import { post } from "../netUtils/api";

export const submitInput = (input:any) => {
    const data = {
        "bot_id": "7474923254533472291", // 替换YOUR_BOT_ID为你的Bot ID
        "user_id": "czh", // 替换YOUR_USER_ID为你的用户ID
        'stream':true,
        "additional_messages": [{
          "content_type": "text",
          "content": input,
          "role": "user"
        }]
      
      };
    return new Promise((resolve:any, reject:any) => {
        post("/v3/chat",data)
          .then((res:any) => {
            resolve(res);
          })
          .catch((err:any) => {
            reject(err);
          });
      });
  };